package com.yang.SpringTest.annotation.propertySourceLearn;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

/**
 * <p>PropertySource测试类</p>
 *
 * @author By: chengxuyuanshitang
 * Package com.yang.SpringTest.annotation.propertySourceLearn
 * Ceate Time 2024-03-15 17:07
 */

public class PropertySourceTest {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(PropertySourceConfig.class);
        ConfigurableEnvironment environment = context.getEnvironment();
        System.out.println("who is ? =: " + environment.getProperty("who"));
        System.out.println("do something ? = :" + environment.getProperty("do"));
    }
}
